<div class="modal-header">
    <h3>{{config.title}}</h3>
</div>
<div class="modal-body">

    <div class="alert alert-warning" ng-if="state == 'ask-prompt'">
        {{config.promptMessage}}
    </div>

    <div class="alert alert-info" ng-if="state == 'started'">
        {{config.waitingMessage}}
    </div>

    <div class="alert alert-success" ng-if="state == 'done'">
        {{config.endMessage}}
    </div>

    <div ng-if="state == 'done' && config.resultUri" ng-include="config.resultUri">
    </div>

    <div class="ot-alert-{{message.type}} alert-dismissable" ng-if="message">
        <span>{{message.content}}</span>
    </div>

</div>
<div class="modal-footer">

    <button class="btn btn-primary" type="button" ng-click="promptOk()" ng-if="state == 'ask-prompt'">OK</button>
    <button class="btn btn-primary" type="button" ng-if="state == 'started'" disabled="disabled">
        <span class="ot-loading-indicator"></span>
        On going
    </button>
    <button class="btn btn-primary" type="button" ng-click="doneOk()" ng-if="state == 'done'">OK</button>
    <button class="btn btn-link" type="button" ng-click="cancel()" ng-if="state == 'ask-prompt'">Cancel</button>
    <button class="btn btn-link" type="button" ng-click="cancel()" ng-if="state == 'error'">Close</button>
</div>